/* 
Scenic Graphics Library
Copyright (C) 2007 Jouni Tulkki

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USApackage scenic;
*/

#ifndef Scenic_Renderer_Primitives_h
#define Scenic_Renderer_Primitives_h

namespace Scenic 
{ 
namespace Renderer
{

#define LINE_PRIMITIVES_TYPE 1

class Primitives
{
	Context *context;
	VertexStore *vertexStore;
public:
	Primitives(Context *context);
	virtual ~Primitives();

	Context *getContext() { return context; }
	void setContext(Context *context) { this->context = context; };
	void setVertexStore(VertexStore *vs) { vertexStore = vs; }
	VertexStore *getVertexStore() { return vertexStore; }

	virtual int getType() = 0;
	virtual void draw() = 0;
};

class AttributeInfo
{
public:
	int type;
	int size;
	char *data;
	int length;

	AttributeInfo()
	{
		size = 0;
		data = 0;
		length = 0;
	}
};

class ScenePrimitives
{
public:
	int type;
	AttributeInfo attributes[ATTRIBUTE_SIZE];
	float fragmentParameters[FP_SIZE][4];
	Image *textures[1];

	ScenePrimitives()
	{
		textures[0] = 0;
	}
};

}
}

#endif
